package extensions.packet;

import extensions.romario.packet.Packets;


public class PacketBuilder {

    public static ClientPacket getPacket(int id) {

        switch (id) {
            case Packets.PACKET_MESSAGE:
                return new MessagePacket();
            case Packets.PACKET_MOVE_TANK:
                return new MoveTankPacket();
            case Packets.PACKET_START_GAME:
            	return new StartGamePacket();
            default:
                throw new IllegalArgumentException("Packet with id '" + id + "' does not exist.");
        }
    }
}
